package net.pws.oos.biz.service.impl;

import net.pws.common.persistence.EntityManager;
import net.pws.oos.biz.model.Project;
import net.pws.oos.biz.service.ProjectService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class DefaultProjectService implements ProjectService {
    
    @Autowired
    private EntityManager entityManager;
        
    public Project save(Project project) {
        entityManager.persist(project);
        return project;
    }
    
    public void delete(String id) {
        entityManager.removeById(Project.class, id);
    }
}
